import { lazy } from 'react'
import { MailOutlined, SettingOutlined } from '@ant-design/icons'
import echarts from './modules/echarts'
const asyncRouters: SyncRoute['AsyncRoutes'][] = [
  {
    path: 'homepage',
    name: 'homepage',
    component: lazy(() => import('@/pages/Homepage')),
    children: [
      {
        path: 'index',
        name: 'index',
        component: lazy(() => import('@/pages/Homepage/ces')),
        meta: {
          title: '测试',
          icon: <SettingOutlined />
        }
      },
      {
        path: 'ccc',
        name: 'ccc',
        component: lazy(() => import('@/pages/Homepage/ccc')),
        children: [
          {
            path: 'caa',
            name: 'caa',
            component: lazy(() => import('@/pages/Homepage/ccc/caa')),
            meta: {
              title: '测试2',
              icon: <MailOutlined />
            }
          }
        ],
        meta: {
          title: '加载',
          icon: <MailOutlined />
        }
      },
      {
        path: 'ces',
        name: 'ces',
        component: lazy(() => import('@/pages/Homepage/cess')),
        children: [
          {
            path: 'cess',
            name: 'cess',
            component: lazy(() => import('@/pages/Homepage/cess/cesss')),
            meta: {
              title: '测试2',
              icon: <MailOutlined />
            }
          }
        ],
        meta: {
          title: '加载',
          icon: <MailOutlined />
        }
      }
    ],
    meta: {
      title: '加载1',
      icon: <MailOutlined />
    }
  },
  {
    path: 'admin',
    name: 'admin',
    component: lazy(() => import('@/pages/Admin')),
    children: [
      {
        path: 'index',
        name: 'index',
        component: lazy(() => import('@/pages/Admin/Eb')),
        meta: {
          title: '默认用户',
          icon: <SettingOutlined />
        }
      },
      {
        path: 'ea',
        name: 'ea',
        component: lazy(() => import('@/pages/Admin/Ea')),
        meta: {
          title: '用户',
          icon: <SettingOutlined />
        }
      }
    ],
    meta: {
      title: '用户',
      icon: <SettingOutlined />
    }
  },
  echarts
]
export default asyncRouters
